package com.app.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 抽奖记录
 * </p>
 *
 * @author yoominic
 * @since 2023-12-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("lm_lottery_record")
public class LotteryRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 游戏id
     */
    private Integer gameId;

    /**
     * 用户id
     */
    private Integer userId;

    @TableField(exist = false)
    private UserModel user;
    /**
     * 抽奖时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private LocalDateTime drawTime;

    /**
     * 是否中奖 0：未中奖 1：中奖
     */
    private Integer isHit;

    /**
     * 中奖奖品
     */
    private String hitPrize;

    /**
     * 是否发放 1未发放，2 已发放 3 待收货
     */
    private Integer isSend;
    private Integer addressId;
    private Integer expressCompany;//快递公司
    @TableField(exist = false)
    private String expressCompanyText;
    private String trackingNumber;//快递单号
    private String orderSn;
    private String message;
    private Integer type;//奖品类型
    /**
     * 发放结果
     */
    private String sendMsg;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    @TableField(exist = false)
    private String date;

    @TableField(exist = false)
    private String mobile;
    @TableField(exist = false)
    private AddressModel addressModel;
    @TableField(exist = false)
    private Object deliveryVo;

    private String address;
    private Integer bussinessId;
    private Integer bussesType;

    @TableField(exist = false)
    private String bussinessName;

    /**
     * 有效时长
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date effectiveTime;
}
